c/c++ win32api
C/C++ Win32API
Win32API C/C++ Documentation:
theForger’s Win32 API Tutorial [english]
Win API Con Clase [spanish]
I made a single uploader application (c/c++ win32api) and web administrator panel (php/javascript/mysql)
C/C++ Win32API
Win32API C/C++ Documentation:
theForger’s Win32 API Tutorial [english]
Win API Con Clase [spanish]
I made a single uploader application (c/c++ win32api) and web administrator panel (php/javascript/mysql)
Use CImg on MinGw
Needs MinGW
Downlaod CImg
This example code is taken from: Fatchoco Blog
test.cpp:
#include "CImg.h" using namespace cimg_library; int main(int argc, char *argv[]) { CImg<unsigned char> img(640,400,1,3); // Define a 640x400 color image with 8 bits per color component. img.fill(0); // Set pixel values to 0 (color : black) unsigned char purple[] = { 255,0,255 }; // Define a purple color img.draw_text(100,100,"Hello World",purple,0,1,35); // Draw a purple "Hello world" at coordinates (100,100). img.display("My first CImg code"); // Display the image in a display window. return 0; }
Put CImg.h in the same dir as test.cpp and compile:
g++ test.cpp -c -o test.o g++ test.o -lgdi32 -o test.exe
C/C++ and NetBeans
NetBeans needs C/C++ compiler, the better option is GCC (GNU Compiler Collection).
On Win32 you can use Cygwin to get it.
On Project Properties you can change the Build options (Debug or Release), add libraries, Plataform, Package type (tar/zip/rpm,deb), Strip Symbols (reduce size of the executable)
Your executable will be on:
\NetBeansProjects\(your project)\build\(Debug or Release)\Cygwin-Windows\
Remember you application depends of cygwin1.dll ( c:\cygwin\bin\cygwin1.dll )
If you compile C files you can disable this depency using “-mno-cygwin” on CFLAGS options on your Makefile
See dependencies of you executable (using cygwin):
objdump application.exe | grep "DLL"
or use Depency Walker
Cygwin
http://www.cygwin.com/
http://www.redhat.com/services/custom/cygwin/
MinGw
http://www.mingw.org/
C Compile on Demand
If you want to use C/C++ as CGI you need compile the code you can compile on demand check C Cod WebSite
See the Documentation some aspects similars to ASP(VBScript).
you now:
#!/usr/bin/php #!/usr/bin/perl #!/usr/bin/python #!/bin/bash ...
Add this #!/usr/bin/ccod to use C/C++, one simple example:
#!/usr/bin/ccodDownload C Cod.
PDF Libraries
Sometimes we need create or export data into a PDF:
.NET:
http://www.pdfsharp.com, http://www.codeplex.com/Print2Pdf
C++:
Perl:
http://search.cpan.org/~markusb/PDF-Create/lib/PDF/Create.pm
sudo perl -MCPAN -e 'install PDF::Create'
PHP:
http://www.fpdf.org, http://www.digitaljunkies.ca/dompdf, http://pear.php.net/package/File_PDF
Python:
wget -c http://www.reportlab.org/ftp/ReportLab_2_2.tgz tar xvzf ReportLab_2_2.tgz cd ReportLab_2_2 sudo python setup.py install
Java:
http://www.lowagie.com/iText, http://www.pdfbox.org
Ruby:
http://ruby-pdf.rubyforge.org/pdf-writer
sudo gem install pdf-writer