wxnet for under $1000

Questions about wxWidgets running on MS.NET, mono or Portable.NET ? Ask it here !
Post Reply
peterjtracey
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Oct 08, 2004 10:33 pm
Location: Long Beach, CA

wxnet for under $1000

Post by peterjtracey » Fri Oct 08, 2004 11:04 pm

Hi again,

So going through the windows build process I didn't want to use VS.net to
compile. I use SharpDevelop for C# and Dev-CPP for C++ and C development -
and *almost* have the wx-c and wx.net dlls compiling in these. I figure I
should share the directions so far so that people who haven't forked over
the $$ for visual studio and don't have access to a linux box can still
compile wxnet :) This uses free software.

In the build instructions, when you run into "open the sln file" ... stop!

Grab SharpDevelop if you don't have it, and use File->Import to load the
sln file. You'll get a warning that it can't load wx-c, that's fine
because we're gonna use Dev-cpp for that :)

Before you compile it you have to make sure it can find keys.snk - I just
copied it 2 directories up from the Bin directory, and then it was happy.

For wx-c, follow the instructions to set Dev-CPP up for compiling with
MinGW/wxWidgets here: http://www.wxwindows.org/devcpp.htm

Then create a new empty C++ DLL project, and add all the cxx files from the wx-c
directory.

Under project options, setup the library/include/resource directories for wxWidgets, and set the parameters to

"-DWXMAKINGDLL -DWIN32 -D_WINDOWS -DWINVER=0x400 -D_MT -DwxUSE_GUI=1 -DWXUSINGDLL -DWXNET_DISPLAY -DWXNET_STYLEDTEXTCTRL -DWXMAKINGDLL_STC -DWXNET_XMLRESOURCE -D_DEBUG -D__WXDEBUG -DWXDEBUG=1"

(without the quotes)

When you compile, you'll get the error: "C:\Dev-Cpp\Makefile.win
[Build Error] [wx-c.dll] Error 255"

The input line is too long.

...so the last step has to be done manually, by copying and pasting the command from the compile log and making a bat file to do it. Take out all the "../wxNET/wx.NET/Src/wx-c/xmlresource.o ../wxNET/wx.NET/Src/wx-c/app.o ../wxNET/wx.NET/Src/wx-c/artprovider.o" etc and replace it with *.o open a command prompt and run the bat from the wx-c directory.

I'm stuck at this step, it crunches away for a little while then the errors roll, my .bat file looks like this:

dllwrap.exe --output-def libwx-c.def --driver-name c++ --implib libwx-c.a *.o C:\Dev-Cpp\wx-c_private.res -L"C:/MinGW/lib" -L"C:/wxWidgets-2.5.2/lib/vc_lib" -L"C:/wxWidgets-2.5.2/lib/vc_lib/mswd" -L"C:/wxWidgets-2.5.2/lib" --no-export-all-symbols --add-stdcall-alias -o wx-c.dll

I think it's some little configuration problem, though.. should have it solved shortly...

Hope this helps! I'm going through all this because I need wxTaskbarIcon...

Pete

peterjtracey
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Oct 08, 2004 10:33 pm
Location: Long Beach, CA

Post by peterjtracey » Mon Oct 11, 2004 11:26 pm

Update:

The last command looks like this now:

dllwrap.exe --verbose --driver-name c++ --implib libwx-c.a *.o C:\Dev-Cpp\wx-c_private.res -L"C:/MinGW/lib" -L"C:/wxWidgets-2.5.2/lib/vc_lib" -L"C:/wxWidgets-2.5.2/lib/vc_lib/mswd" -L"C:/wxWidgets-2.5.2/lib" --no-export-all-symbols --add-stdcall-alias --output-def libwx-c.def -mwindows -Wl,--subsystem,windows -mwindows -lwxmsw25d_xrc -lwxmsw25d_core -lwxmsw25d_adv -lwxmsw25d_html -lwxmsw25d_stc -lwxbase25d -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -o wx-c.dll

...but I still get errors from dlltool - a bunch of these:

dlltool: Warning, ignoring duplicate EXPORT _ZNK12wxWindowBase24AcceptsFocusFromKeyboardEv -1,-1

:(

Post Reply