User forums > Using Code::Blocks
add-stdcall-alias
Pecan:
What compile/linker is dev-cpp using?
Could it be a compiler version problem?
iorec:
codeblocks autodetected the mingw32 files in my \Dev-cpp directory. therefore the compiler/linker used is the same. how can i find out their version?
Pecan:
Sorry, I'm stumped. Since the compiler is the same for Dev-cpp and CodeBlocks, I don't understand why it doesn't work.
Could you paste the Dev-cpp compiler command line here also so we might detect the difference between the options going out for one as opposed to the other.
iorec:
right. here is dev-cpps compile log:
g++.exe -c FiducialObject.cpp -o FiducialObject.o -I"C:/Dev/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev/Dev-Cpp/include" -I"libfidtrack" -D__GNUWIN32__ -W -DWIN32 -DNDEBUG -D_WINDOWS -D_MBCS -D_USRDLL -DFREEFRAME_EXPORTS -O3
dllwrap.exe --output-def libFiducialTracker.def --driver-name c++ --implib libFiducialTracker.a FreeFrame.o FiducialTracker.o libfidtrack/dump_graph.o libfidtrack/fidtrack120.o libfidtrack/fidtrackX.o libfidtrack/segment.o libfidtrack/threshold.o libfidtrack/tiled_bernsen_threshold.o libfidtrack/topologysearch.o libfidtrack/treeidmap.o FiducialObject.o -L"C:/Dev/Dev-Cpp/lib" -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32 --add-stdcall-alias -o FiducialTracker.dll
dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
Execution terminated
Compilation successful
Pecan:
Well... you notice that Dev-cpp is running dllwrap.exe after a compile. It looks to me like dllwrap calls the linker, creating a dll from the .def file.
So we're right back to here: http://www.willus.com/mingw/yongweiwu_stdcall.html
Either you're going to have to create your dll using the following:
--- Quote from: tiwag on September 07, 2006, 08:46:15 am ---if you want to build a dll with import names, that are consistent between different compilers, you need
to build it as C code, which then uses the C naming conventions.
use
--- Code: ---#ifdef __cplusplus
extern "C"
{
#endif
.... // here are your exported function names
#ifdef __cplusplus
}
#endif
--- End code ---
infos
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
--- End quote ---
or you're going to have to learn to use dllwrap in CodeBlocks.
To learn more, do a search on "__cplusplus"
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version