Options

C/FRONT and choice of compiler

Andreas_LundinAndreas_Lundin Member Posts: 91
edited 2000-07-29 in Navision Financials
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.

Comments

  • Options
    paulflorypaulflory Member Posts: 5
    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?
  • Options
    Tomeu_VizosoTomeu_Vizoso Member Posts: 1
    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.
  • Options
    dbdb Member Posts: 82
    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.
  • Options
    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 ??

    JC
Sign In or Register to comment.