User forums > Using Code::Blocks
Trying to create a DLL from Enet source code
stahta01:
--- Quote from: slenkar on May 19, 2007, 12:07:20 am ---thanks
how do you put it in release mode?
and which files do I add to the project?
--- End quote ---
On the compiler toolbar, change "Build Target" to "Release"
Note: I used the GUI to start the DLL Project.
File -> New -> Project -> "Dynamic Link Library"
It defaults to two targets "Debug" and "Release"
I edited the single file main.cpp like my sample above.
Note, if I leave out the include of "enet/enet.h" I get an error like yours. But, I needed to the other changes to get it to work.
Tim S
slenkar:
I can only seem to get
default
or
all
as choices for the build target
stahta01:
Did you build the Enet static library as debug or as release?
Debug in minGW GCC normally means options "-g" and "-D_DEBUG" are used.
Release in minGW GCC normally means option "-DNDEBUG" is used; sometimes optimize options like "-O2" are only used with release.
Note, I just found what looks like bad setting on building the debug version of Enet static library. Will retry it again.
Did you build Enet static library using Code::Blocks?
Did you build Enet static library using minGW GCC?
Tim S
stahta01:
Found out that the Release build was failing also, Code::Blocks just was not displaying the error in the message window.
Will post more if I get it to work.
Tim S
stahta01:
I think I got it to work.
You need to add libraries
enet, wsock32, winmm, ws2_32
Uploaded project to http://www.savefile.com/files/733788
The rest of my CodeBlocks stuff is at http://www.savefile.com/projects/1039215
File layout top is the folder that contains enet.dsp; only some files shown, but it should be enough to confirm where to extract to.
/top/enet.dsp
/top/enet.cbp
/top/enet.workspace
/top/testdll/testdll.cbp
Tim S
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version