Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-2190

Error compiling C program using libwindowmanager

    Details

      Description

      Am trying to build source file to interact with windowmanager

      Makefile

       

      LFLAGS = -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/xdt/sdk/sysroots/corei7-64-agl-linux -Wl,-O1LFLAGS = -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/xdt/sdk/sysroots/corei7-64-agl-linux -Wl,-O1
      CXX    = x86_64-agl-linux-g++  -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/xdt/sdk/sysroots/corei7-64-agl-linux
      build: $(CXX) $(LFLAGS) main.cpp -o main
      

       

      main.c

       

      #include <iostream>
      #include <libwindowmanager.h>
      LibWindowmanager *wm;
      int main() {
       wm = new LibWindowmanager();
      std::cout << "Hello, AGL!" << std::endl;
      }
       
      

      Getting this error when compiling:

      In function `main': 
      main.cpp:(.text+0x18): undefined reference to `LibWindowmanager::LibWindowmanager()' 
      collect2: error: ld returned 1 exit status 
      Makefile:7: recipe for target 'build' failed 
      make: *** [build] Error 1

       

      Not sure if I'm doing any of this correctly. Took the list of flags from a Makefile generated to qmake for one of the existing AGL apps.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              wangzhiqiang zhiqiang wang
              Reporter:
              KernelDeimos Eric Dubé
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: