Jump to content
Sign in to follow this  
n4gix

Visual C++ .Net for Gauge Programming

Recommended Posts

Guest HC001ST - Stick

Ok.Thanks for the idea. This is likely because I had included the .h's in the project, when they are called by the .ccp and .c file.Also appears that I only need the .ccp file, as the testvector.c doesn't appear to be a part of the test_gdiplus gauge.

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

Making progress. Now down to this.Linking...testgdiplus.obj : error LNK2001: unresolved external symbol _ImportTabletestgdiplus.obj : error LNK2001: unresolved external symbol _LinkageMSVCRT.LIB(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartupRelease/gdiplus.exe : fatal error LNK1120: 3 unresolved externalsBuild log was saved at "file://c:Documents and SettingspatrickMy DocumentsMy DevelopmentGaugesgdiplusReleaseBuildLog.htm"gdiplus - 4 error(s), 0 warning(s)---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skippedInterestingly, MSVCRT.LIB has been added to the projects link input.

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

While we're on the subject of two files added...Seems ashame to have this cool IDE and not be able to have all the source files available at your finger tips to click on because you can only add the "master" or "root" files so they don't get compiled twice.What's up with that? Is there a way around this. Right now, I've keep explorer open and dragged the other .c files into the IDE so that they aren't in the project build list, but this seems like there must be a better way!Thanks for all the help.

Share this post


Link to post
Share on other sites
Guest HartmannH

"_WinMain@16" and "Release/gdiplus.exe" look like a Win32 EXE project to me. It must be a Win32 DLL.

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

What is "it"?The project is a win32 dll, is it not supposed to be for GDI?Ok.... double checked, and had it set to build an .exe. Changed that to .dll, but still get this:testgdiplus.cppCompiling resources...Linking...testgdiplus.obj : error LNK2001: unresolved external symbol _ImportTabletestgdiplus.obj : error LNK2001: unresolved external symbol _LinkageRelease/gdiplus.exe : fatal error LNK1120: 2 unresolved externalsgetting there!

Share this post


Link to post
Share on other sites
Guest bartels

If you follow the "standard" way you can only add the main.c(pp) and the main.rc file to the project. If you need to browse, just have look under "Dependencies" in your project files. However there is another way to compile gauges, one file for the main project and at least one file for any subgauge, all .cpp,.c files added to the project itself. It needs a bit of code tuning of course. I have a TrafficRadar gauge as example code to learn about GDI+,Traffic interface, etc. that uses exactly this approach. Did I put it in the forum? I can't recall. Anyone intereseted? I assume the vectorgraphic example I put on this forum ages ago also uses this way of compiling module by module.Arne Bartels

Share this post


Link to post
Share on other sites
Guest bartels

Changing the extension to exe doesn't change a thing on compiling. You have to start with a DLL project no matter what. OK it might be possible to change an .exe project to an .dll project by adjusting all the options, biut I don't know how. Simply start new with a dll project.Arne Bartels

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

Arne,That would be great. It seems like I must not have everything from your original demo.In any case, a question.In .NET to create a project from scratch, it seems there is only an MFC .dll, that is available to create, and you can't create a blank project with this puppy. Moreover, something tells me this isn't the same as a "win32" .dll from VC++ 6.0.If you create a project from scratch in .NET 2003, which are you selecting as the base?My email is if you want to send a link to your traffic radar example.Thanks

Share this post


Link to post
Share on other sites

>@Bill: I will send you that sample project later today. Please>send me a PN with your email. Thanks a lot :-)I already posted it previously, but here it is again:n4gix@comcast.netSomeone mentioned a "mygaugename.def" file, which I created, but only now discovered that I have to explicitly declare THAT in the Linker tab along with the MSVCRT.LIB & GDIPLUS.LIB...Having done that, I'm now down to these few "errors:"Linking...testgdiplus.def : error LNK2001: unresolved external symbol ImportTabletestgdiplus.def : error LNK2001: unresolved external symbol LinkageRelease/TestGDI.lib : fatal error LNK1120: 2 unresolved externalsLINK : fatal error LNK1141: failure during build of exports file


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest bartels

Ah, that's the problem. Can't help you there, I have VC++6.0.Arne Bartels

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

And having added gdiplus.def to my linker inputs, I'm down to:gdiplus.def : fatal error LNK1106: invalid file or disk full: cannot seek to 0x617BStick

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

Ok, well one work around, if this turns out to be it, is to create it in VC++ 6.0, then open the project in .NET which will convert it.I'll see if that helps by trying it.

Share this post


Link to post
Share on other sites

>Arne,>In .NET to create a project from scratch, it seems there is>only an MFC .dll, that is available to create, and you can't>create a blank project with this puppy. Moreover, something>tells me this isn't the same as a "win32" .dll from VC++ 6.0.Now that is strange!I can pick Win32, Win32 Project, enter a Name... Click OKThen, in the next menu, click on Application Settings, DLL, and Empty Project...You don't have that template???


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest HC001ST - Stick

Yeah!!!! Thanks, I needed to find that! Haha.Yes, I have that too, but it was "buried". Imagine that in an MS product!

Share this post


Link to post
Share on other sites

>And having added gdiplus.def to my linker inputs, I'm down>to:>>gdiplus.def : fatal error LNK1106: invalid file or disk full:>cannot seek to 0x617BWell, I still have this:Compiling...testgdiplus.cppCompiling resources...Linking...TestGDI.DEF : fatal error LNK1106: invalid file or disk full: cannot seek to 0x415BStill no "Template" or "Blank Project Builder" file to use... :(


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...