Jump to content
Sign in to follow this  
jcboliveira

Visual C++ .NET help

Recommended Posts

Guest Jon_Gibbs

Hi,Has anyone compiled a running gauge with Visual C++ .NET and then had it not work on other computers that don't have Visual C++ .NET? I have experienced this many times and have had to resort to having someone else compile for me. Does anyone know what causes this and/or a way around it?-Jon

Share this post


Link to post
Share on other sites

A way around the problem?Use Borland BCC55 or MinGW to compile the gauge(s)...


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 HartmannH

Jon,I compile my gauge with VC++ .NET all the time and had no problems at all. No special settings needed.Did you add a yourgauge.def file in your project? That's absolutely necessary to make the gauge work in FS. I'm in office so I can't tell you how it has to look (I just copy and modify the one from the last project ;-) ) but I can post one later today.@Bill:Would you really use a command line compiler when you have on with IDE and integrated debugger? I don't think so. BC55 and MinGW can't even be compared to VC.NET.

Share this post


Link to post
Share on other sites
Guest Fabio Miguez

Hey guys,As a side note, me and the IDE do not get along very well. I used it for about a year, but after switching to the Visual C linecompiler through the use of makefile and VCVARS32.bat, I am not going back. I do all my coding in TextPad (thanks Matt), then go to a command window and type 1, copying the idea Matt used. 1.bat is a file that simply calls VCVARS32.bat, so I don't have to type that.Sure, press F7 in the IDE, also a one key deal, but for me, the line compiler uses way less resources, and TextPad even highlights the code just like the IDE by recognizing file extensions .c or .cpp or .h, so overall I believe it boils down to preference, not speed.

Share this post


Link to post
Share on other sites
Guest HartmannH

@Jon: Here's the .def file:LIBRARY YOURGAUGE.GAUEXPORTS Linkage ImportTable@Fabio: I never had any problems with the IDE. I really can't understand what could be the problem. There's no way to do gauges more comfortable and efficient.

Share this post


Link to post
Share on other sites
Guest Fabio Miguez

Hey Hans,Never had any problems either, just find TextPad more comfortable.

Share this post


Link to post
Share on other sites

>Would you really use a command line compiler when you have on>with IDE and integrated debugger? I don't think so. BC55 and>MinGW can't even be compared to VC.NET.Being poor as dirt, I cannot afford "fancy schmanzy" stuff like VC.NET... :( Besides which, real programmers use EDLIN to create Windows apps! :)I am sort of visually oriented though, since i use the programmer's edition of Easy Gauge to build do all the 'hard stuff' of element placement and mouse areas, then add the real code using notepad.exe...


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 _ak

>I am sort of visually oriented though, since i use the>programmer's edition of Easy Gauge to build do all the 'hard>stuff' of element placement and mouse areas, then add the real>code using notepad.exe...Better learn vector graphics

Share this post


Link to post
Share on other sites

>>I am sort of visually oriented though, since i use the>>programmer's edition of Easy Gauge to build do all the 'hard>>stuff' of element placement and mouse areas, then add the>real>>code using notepad.exe...>>Better learn vector graphicsI learn something new everyday. That is one among many things I'm working on. No one is born with all this knowledge; it requires a lot of study and practice...One thing I learned early on though is that no "tool" is better than the hands of the artist who wields it. If the artist has no 'native talent,' that will be reflected in their finished product... :)


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 Jon_Gibbs

Hi,I have always seen that .def file in the project folder and still haven't had any luck. Do I need to add it somewhere in the solution explorer? -Jon

Share this post


Link to post
Share on other sites
Guest bartels

I'm not familiar with .NET, but the .def file is normally for other applications/dlls to load functions out of the compiled dll/gau. It is needed for compiling other modules. Since FS gauges re usually only loaded by FS itself with a standard interface (_ImportTable,_Linkage), you normally don't need to bother about the .def file. Apart from that, with the use of "dllimport" in the gauges.h the .defs aren't needed at all (a t least for VC6.0,GCC, don't know about BCC).Arne Bartels

Share this post


Link to post
Share on other sites
Guest JeanLuc_

BCC requires a file like this which reads (well in my setup):EXPORTS Linkage=_Linkage ImportTable=_ImportTableHowever, with VC, it shouldn't be necessary from what I've been told, since the gauge.h defines the exported entries properly, and the linker uses this alright.As for the editor, the IDE etc..., to each is own! I know great projects done without the VC IDE... :-)I personaly have enjoyed the LCC Win32 IDE, and the BCC command line compiler with makefile. Sure the VC IDE is nice, manages the classes efficiently, but I disagree (and the answers from others seems to as well), that in order to work seriously with gauge development you can't do other than VC IDE...As for debuging? the best I know (free) is:http://home.t-online.de/home/Ollydbg/Hope this helps!

Share this post


Link to post
Share on other sites
Guest Arnt Helge

I have been using VS .NET myself for a while making C gauges. With the recent release of the panel sdk I wanted to try to get AI traffic data through ITrafficInfo interface. But I don't know how to make gauges using C++. It would be great if someone could post (or e-mail me at arnthelge@mostrealisticai.com) the complete source code of a simple VS .NET C++ gauge project.Many thanks in advance!Regards,Arnt Helge Haaland

Share this post


Link to post
Share on other sites
Guest bartels

Don't know about .NET, but for C++ instead of C compilation with C/C++ compilers you only need to rename the source to .cpp. In principle the new gauges.h should be able to compile with C++, but I haven't checked yet.Arne Bartels

Share this post


Link to post
Share on other sites
Guest _ak

He-he, my project is pure C++ :)Works fine

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...