No announcement yet.

Can't get #USE, USING to work

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't get #USE, USING to work

    Compiler says:

    Error: 'tom' not found (line 36 file:NoName1.4Dg)Error: context error for unknown 'tom' (line 36 file:NoName1.4Dg)2 errors0 warnings3 notices


    #platform "uLCD-43PT" // Program Skeleton 1.0 generated 10.7.2013 22:35:19 #inherit "4DGL_16bitColours.fnc" #inherit "" #inherit "" #inherit "mylib.lib" #USE tom func main()// var hstrings ; // Handle to access uSD strings, uncomment if required// var hFontx ; // Handle to access uSD fonts, uncomment if required and change n to font number// Uncomment the following if uSD images, fonts or strings used./* putstr("Mounting...\n"); if (!(disk:=file_Mount())) while(!(disk :=file_Mount())) putstr("Drive not mounted..."); pause(200); gfx_Cls(); pause(200); wend endif gfx_TransparentColour(0x0020); gfx_Transparency(ON); // hFontn := file_LoadImageControl("NoName1.dan", "NoName1.gcn", 1); // Open handle to access uSD fonts, uncomment if required and change n to font number dropping a and c if > 9// hstrings := file_Open("NoName1.txf", 'r') ; // Open handle to access uSD strings, uncomment if required hndl := file_LoadImageControl("NoName1.dat", "NoName1.gci", 1);*/ tom(); gfx_Set(SCREEN_MODE,LANDSCAPE_R) ; repeat foreverendfunc

    and the mylib.lib file:

    //In a file named mylib.lib#IF USING tomfunc tom() putstr("Tom\n"); endfunc#ENDIF

  • #2

    Okay it started to work. There really is something that does not mix with my system and the 4d workshop.


    • #3
      For some reason when creating the project I have to save it to C:\Users\Public\Documents\4D Labs and then I can copy it over to example E:\My Documents\Visual Studio 2012\Projects\BlackBox\4DLabs\4DViSi
      If I dont do that then it wont work at E:\My Documents\Visual Studio 2012\Projects\BlackBox\4DLabs\4DViSi

      My os is windows 8


      • #4
        Could it be possible that there's an old "mylib.lib" in E:\My Documents\Visual Studio 2012\Projects\BlackBox\4DLabs\4DViSi ?


        • #5

          Well that is what I thought first, but that does not seem to be the problem because I even created the hole project again from nothing and still get the issue.