Microsoft Visual Studio 2010 Express linker won't link application (using Sourcery Codebench Lite) | developer.brewmp.com Microsoft Visual Studio 2010 Express linker won't link application (using Sourcery Codebench Lite) | developer.brewmp.com

Developer

Microsoft Visual Studio 2010 Express linker won't link application (using Sourcery Codebench Lite)

Hi,

 

my application runs fine under BREW 3.1.5 and I am trying to port it to BREW MP.

If I build it using the Microsoft Visual Studio 2010 Express IDE, it builds without error but has problems when I try running it so I would like to be able to step through it in the simulator using the debugger.

As mentioned in my previous post, I was not able to get this to work however:

https://developer.brewmp.com/forum/cannot-run-application

Breakpoints that I set in the Visual Studio debugger are not hit even though the simulator was started by the debugger and the code where I set the breakpoint is being executed.

I could not find a way to get this to work so switched to Sourcery Codebench Lite (the latest EABI version).

 

Under "Setup for C/C++ Environment - Command Line (No IDE)"

https://developer.brewmp.com/tools/brew-mp-sdk-7115 says that I can use Sourcery Codebench Lite.

Although I notice a bunch of posts in the support forums telling people to download the IA32 Windows edition - which is not available as a Lite edition and costs $400.

 

My code compiles with no errors or warnings using the internal eclipse compiler but when I actually try to generate machine code I run into problems. First of all I found that I have to run as Administrator, as reported in the forums - that is crazy but I can live with it.

The Sourcery Codebench Lite version of Eclipse lists 6 different Toolchains under "Tool Chain Editor".

I tried mingw gcc and it barfs on all the BREW headers - it doesn't like things like __declspec even though it's GCC 4.6.1 and gcc is supposed to support __declspec.

So I selected "Microsoft Visual C++" and it compiles all of my files no problem. But then the Microsoft linker says it can't find kernel32.lib.

I searched under the Visual C++ installation and that file is indeed missing. But my application builds fine if I build it from the Visual C++ IDE - I just can't debug it - what gives ?

the arguments for the linker are:

link /DLL /debug /nologo /OUT:timecardmp.dll xml.obj userpass.obj tracking.obj timer.obj teamxml.obj tcpgateway.obj tapi.obj strutils.obj strrtrim.obj strltrim.obj strblank.obj sound.obj sendmsg.obj posdetxml.obj popup.obj options.obj navui2.obj message.obj md5.obj log.obj list.obj jobxml.obj geofence.obj fqueue.obj fileutil.obj event.obj eula.obj download.obj device.obj connstat.obj compat.obj commonxml.obj common.obj brewtcp.obj brewgps.obj attribute.obj attach.obj GUIutil.obj DataStore.obj AEEModGen.obj AEEAppGen.obj

 

and the output is

LINK : fatal error LNK1104: cannot open file 'kernel32.lib'

 

When I build it from the Visual Studio IDE the command line is :

C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:".\Debug\BREW TimeCard.dll" /INCREMENTAL /NOLOGO /MANIFEST /ManifestFile:".\Debug\BREW TimeCard.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:".\Debug/TimeCard.pdb" /ASSEMBLYDEBUG /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Debug/TimeCard.lib" /MACHINE:X86 /DLL ".\Debug\BREW TimeCard.dll.embed.manifest.res"

 

Of course getting it to build and run on the handset is more important than getting it to run on the simulator and as I mentioned it would not even compile for the handset - why is that ?
 
https://developer.brewmp.com/tools/brew-mp-sdk-7115 says:
To get started, please refer to the Brew MP Developer Primer.
 
but that link is broken. I have always used GNUDE to compile for BREW 2.x and 3.x and it works well but I suspect it won't work for BREW MP - does anyone know ?
 

Of course getting it to build and run on the handset is more important than getting it to run on the simulator and as I mentioned it would not even compile for the handset - why is that ?
 
https://developer.brewmp.com/tools/brew-mp-sdk-7115 says:
To get started, please refer to the Brew MP Developer Primer.
 
but that link is broken. I have always used GNUDE to compile for BREW 2.x and 3.x and it works well but I suspect it won't work for BREW MP - does anyone know ?
 

Also I'm guessing that Microsoft uses a proprietary undocumented format for their debug information, like they do for most things so if I do get my application to link using the Microsoft linker, I then won't be able to debug it using Eclipse and/or gdb ?
 
By the way, I have installed the dynamic languages toolkit and Antlr (in that order).
 

Also I'm guessing that Microsoft uses a proprietary undocumented format for their debug information, like they do for most things so if I do get my application to link using the Microsoft linker, I then won't be able to debug it using Eclipse and/or gdb ?
 
By the way, I have installed the dynamic languages toolkit and Antlr (in that order).
 

GNUDE may still be used for compiling BrewMP binaries. you may compile CIF & CAR seperatly.
link using the Microsoft linker & debug using eclipse wont work.
 
here are the broken links you are looking for:-
Command line primer:-https://developer.brewmp.com/resources/primers/brew-mp-application-devel...
C-Eclipse primer:-https://developer.brewmp.com/resources/primers/brew-mp-application-devel...
 
if you still have issues accessing. go to Resources->Primers->BrewMP App Deve.. primer. you will find these topics there.

GNUDE may still be used for compiling BrewMP binaries. you may compile CIF & CAR seperatly.
link using the Microsoft linker & debug using eclipse wont work.
 
here are the broken links you are looking for:-
Command line primer:-https://developer.brewmp.com/resources/primers/brew-mp-application-devel...
C-Eclipse primer:-https://developer.brewmp.com/resources/primers/brew-mp-application-devel...
 
if you still have issues accessing. go to Resources->Primers->BrewMP App Deve.. primer. you will find these topics there.