C/FRONT and choice of compiler

Andreas_Lundin
Member Posts: 91
Hi guys
Just some information, if you would like to use a freeware C/C++ compiler to compile your C/FRONT executables.
If you're using the C/FRONT interface to Navision, many developers obviously prefer Microsoft compiler as their development tool of choice. But it is possible to use a free compiler under the GNU license. My personal choice would be the Gygwin or Mingw32 compiler.
If you use these compilers, yoy'll have some troubles compiling your source, because you get a parse error. You have to make one change in the cf.h file.
Below you can see a code fragment of the first part of the original file.
#ifdef _MSC_VER
#define DBL_CDECL __cdecl
#else
#define DBL_CDECL _cdecl
#endif
In order to use avoid the compiler error, you must change the above code into the following:
#if defined (_MSC_VER) | | defined (__GNUC__)
#define DBL_CDECL __cdecl
#else #define DBL_CDECL _cdecl
#endif
If you have any experience using other compilers but MS Visual C++, please be free to place a comment on this subject.
Regards
Andreas L.
Just some information, if you would like to use a freeware C/C++ compiler to compile your C/FRONT executables.
If you're using the C/FRONT interface to Navision, many developers obviously prefer Microsoft compiler as their development tool of choice. But it is possible to use a free compiler under the GNU license. My personal choice would be the Gygwin or Mingw32 compiler.
If you use these compilers, yoy'll have some troubles compiling your source, because you get a parse error. You have to make one change in the cf.h file.
Below you can see a code fragment of the first part of the original file.
#ifdef _MSC_VER
#define DBL_CDECL __cdecl
#else
#define DBL_CDECL _cdecl
#endif
In order to use avoid the compiler error, you must change the above code into the following:
#if defined (_MSC_VER) | | defined (__GNUC__)
#define DBL_CDECL __cdecl
#else #define DBL_CDECL _cdecl
#endif
If you have any experience using other compilers but MS Visual C++, please be free to place a comment on this subject.
Regards
Andreas L.
0
Comments
-
On a related topic...
It seems that C/Front provides development functionality beyond what C/SIDE provides. For example, I noticed in the documentation that you can create and delete tables with C/Front, but I've never seen a way to do this with C/SIDE.
Is this true?0 -
Ok, now I'm able to compile the *.c, but I can't link it to produce an executable. I have understood by reading the docs that I need to create a libcfront.a library file from the cfront.dll, but I have no idea of how to do it.
Can you tell me how do you compile c/front c files with cygwin's gcc?
Thanks in advance.0 -
Check libload.c included in cfront.
Or you can load dll func by self:
LoadLibrary();
GetProcAddress();
FreeLibrary();
for run-time dll loading.
If you wanna compile time dll loading, you need cfront.lib. I don't seen it yet.0 -
Sorry to butt in - I'm trying to get started with C++ & C/front. My background is very much C/UNIX but now I'm using the MS VC++ IDE. My problem is getting connected in the first place as the manual doesn't really show any particular IDE.
Do I have to use dll's or can I just use the .h - i'd rather stick to ANSI C++ if I can.
Can anyone help with tips, source code etc. At the moment i've included the .h and tried to declare the external functions - but it ain't playing.
Help please ??
JC0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions