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"