Results 1 to 9 of 9
  1. #1
    PvApi prosilica camera for mac os X

    Member Since
    Mar 25, 2014
    Posts
    7
    PvApi prosilica camera for mac os X
    Hello,

    I am using prosilica camera http://www.alliedvisiontec.com/us/ne...k-upda te.html on Mac os x 10.8.5. I downloaded the SDK for Mac OS X.
    I try to execute the examples on the SDK but always I got this errors.
    Code:
    > make sample
        g++-4.2   -O3  -mmacosx-version-min=10.5 -I/usr/bin-pc/x64 -lPvAPI
        make: g++-4.2: No such file or directory
        make: *** [sample] Error 1
    But when i run g++ -v on terminal I got:
    Code:
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
        Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
        Target: x86_64-apple-darwin12.5.0
        Thread model: posix
    And I installed the command line of Xcode and so on ?

    What is the error ? could help me please ?

  2. #2
    PvApi prosilica camera for mac os X
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    Welcome to Mac-Forums..

    What do the following commands say?
    Code:
    which g++
    g++ --version
    You might want to take a look at the Makefile for the SDK and see what default values is being used to compile it. For starters, it looks like the value of CC or whatever is being set to "g++-4.2" while you likely only want "g++".

    You can usually override the value by doing something like "make same CC=g++" or something depending on what the variable is, assuming it's a variable to begin with not hardcoded..
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  3. #3
    PvApi prosilica camera for mac os X

    Member Since
    Mar 25, 2014
    Posts
    7
    Code:
    >which g++
    /usr/bin/g++
    >which gcc
    /usr/bin/gcc
    >g++ --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin12.5.0
    Thread model: posix
    In the SDK, there is an ARCH FILE that contains all configurations.
    -------------------------------------
    ARCH file:
    Code:
    # Global ARCHitecture settings for the Sample code
    #
    # this file should be adapted to your platform
    
    # Target CPU
    #CPU	= x86
    CPU	    = x64
    
    # Target OS
    OS	    = OSX
    OS_DIR  = OSX
    
    # OS-X version
    OSXV	= -mmacosx-version-min=10.5
    # architecture flags
    #ARCH	= -m32
    
    # compilation flags
    OPT	= -O3 $(ARCH) $(OSXV)
    
    # compiler version
    CVER    = 4.2
    # compiler
    CC      =g++-$(CVER)
    # linker
    LD      = ld
    AR      = ar
    SP      = strip
    
    # some flags
    DFLAGS	= -D_$(CPU) -D_$(OS)
    #FLAGS   = -fno-strict-aliasing -fexceptions -I/usr/include $(DFLAGS)
    FLAGS   = -I/usr/include $(DFLAGS)
    
    ## TIFF library
    #LTIFF   = -ltiff
    
    ## few locations
    INC_DIR	  = ../../inc-pc
    BIN_DIR   = ../../bin-pc/$(CPU)
    LIB_DIR   = ../../lib-pc/$(CPU)
    OBJ_DIR	  = ./obj/$(CPU)
    EXTRA_LIB = -lpthread -lz
    
    ## library
    LJPEG   = -ljpeg
    
    ## libs (shared/static)
    PVLIB   = -L$(BIN_DIR) -lPvAPI
    SOLIB	= $(EXTRA_LIB) -Bdynamic -lm -lc
    SALIB	= -Bstatic $(LIB_DIR)/$(CVER)/libPvAPI.a -framework CoreFoundation
    IMLIB   = -Bstatic $(LIB_DIR)/$(CVER)/libImagelib.a -Bdynamic $(LTIFF)
    
    ## final compilation flags
    CFLAGS	= $(OPT) $(FLAGS) -Wall -I$(INC_DIR) -D_REENTRANT $(EXTRA)
    this is the make file for my sample code:
    ----------------------------------------------------------------

    Code:
    # makefile of GigE SDK Sample code
    #
    
    include ../ARCH
    
    ## Executable
    EXE	= ListCameras
    
    $(OBJ_DIR)/%.o : %.cpp
    	$(CC) $(CFLAGS) $(VERSION) -c $< -o $@
    
    clean: 
    	rm $(EXE)
    
    sample : $(EXE).cpp
    	$(CC) $(RPATH) $(TARGET) $(CFLAGS) $(EXE).cpp -o $(EXE) $(SOLIB) $(PVLIB)
    
    sample-static : $(EXE).cpp
    	$(CC) $(RPATH) $(TARGET) $(CFLAGS) $(EXE).cpp $(SALIB) -o $(EXE) $(SOLIB)
    	
    install:
    	cp -f $(EXE) $(BIN_DIR)

  4. #4
    PvApi prosilica camera for mac os X
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    OK, So CC is being set to g++-$(CVER) and CVER is 4.2, thus the messed up name.

    Just pass "CC=g++" at the command line and it should build fine..
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  5. #5
    PvApi prosilica camera for mac os X

    Member Since
    Mar 25, 2014
    Posts
    7
    thanks a lot! it is working.

    But now, I need to do my own code using the sdk. So, where i have to put the inc files, the bin files and the lib files to be recognized in QT. Thanks

  6. #6
    PvApi prosilica camera for mac os X
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    Depends on what you are using to write your program really. If you are going to use g++ to compile your code, you can just pass in the include directory with the "-i" argument, the library folder with the "-L" argument..

    Read up on the g++ man page or documentation online on what this means..

    You, ideally, want to use a Makefile that will manage this for so that you can just use the "make" command to build everything..
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  7. #7
    PvApi prosilica camera for mac os X

    Member Since
    Mar 25, 2014
    Posts
    7
    Hello,

    I am using Qt. Now, I am trying to copy an example ()ListCameras.cpp code from as example sdk in QT. I put PvApi.h in /opt/local/include/ and I try to execute my the code but I get a lot of error. Why it was fine when I compiled it online ?

    the ListCameras.pro is

    Code:
    #-------------------------------------------------
    #-------------------------------------------------
    #
    # Project created by QtCreator 2014-03-25T21:43:24
    #
    #-------------------------------------------------
    
    QT       += core
    
    QT       -= gui
    
    TARGET = ListCameras
    CONFIG   += console
    CONFIG   -= app_bundle
    
    TEMPLATE = app
    
    
    SOURCES += main.cpp
    INCLUDEPATH+=/opt/local/include/
    LIBS+=-L/opt/local/lib/
    LIBS+= -llibPvAPI
    LIBS+= -llibPvJNI
    The erros are all in the PvApi.

    Code:
    In file included from ../ListCameras/main.cpp:55:
    /opt/local/include/PvApi.h:97:26: error: Define PVDECL to be your compiler keyword for "standard call"
                            #error Define PVDECL to be your compiler keyword for "standard call"
                             ^
    /opt/local/include/PvApi.h:271:22: error: expected ')'
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                         ^
    /opt/local/include/PvApi.h:271:14: note: to match this '('
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                 ^
    /opt/local/include/PvApi.h:302:22: error: expected ')'
    typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
                         ^
    /opt/local/include/PvApi.h:302:14: note: to match this '('
    typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
                 ^
    /opt/local/include/PvApi.h:302:15: error: typedef redefinition with different types ('void (void *, tPvHandle, const tPvCameraEvent *, unsigned long)' vs 'void (void *, tPvInterface, tPvLinkEvent, unsigned long)')
    typedef void (PVDECL *tPvCameraEventCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:412:22: error: expected ')'
    typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
                         ^
    /opt/local/include/PvApi.h:412:14: note: to match this '('
    typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
                 ^
    /opt/local/include/PvApi.h:412:15: error: typedef redefinition with different types ('void (tPvFrame *)' vs 'void (void *, tPvInterface, tPvLinkEvent, unsigned long)')
    typedef void (PVDECL *tPvFrameCallback)(tPvFrame* Frame);
                  ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:431:2: error: Define specific data types for your platform.
    #error Define specific data types for your platform.
     ^
    /opt/local/include/PvApi.h:508:6: error: variable has incomplete type 'void'
    void PVDECL PvVersion(unsigned long* pMajor,unsigned long* pMinor);
         ^
    /opt/local/include/PvApi.h:508:12: error: expected ';' after top level declarator
    void PVDECL PvVersion(unsigned long* pMajor,unsigned long* pMinor);
               ^
               ;
    /opt/local/include/PvApi.h:528:8: error: redefinition of 'PVDECL' as different kind of symbol
    tPvErr PVDECL PvInitialize(void);
           ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:528:14: error: expected ';' after top level declarator
    tPvErr PVDECL PvInitialize(void);
                 ^
                 ;
    /opt/local/include/PvApi.h:546:8: error: redefinition of 'PVDECL' as different kind of symbol
    tPvErr PVDECL PvInitializeNoDiscovery(void);
           ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:546:14: error: expected ';' after top level declarator
    tPvErr PVDECL PvInitializeNoDiscovery(void);
                 ^
                 ;
    /opt/local/include/PvApi.h:559:6: error: variable has incomplete type 'void'
    void PVDECL PvUnInitialize(void);
         ^
    /opt/local/include/PvApi.h:559:12: error: expected ';' after top level declarator
    void PVDECL PvUnInitialize(void);
               ^
               ;
    /opt/local/include/PvApi.h:593:8: error: redefinition of 'PVDECL' as different kind of symbol
    tPvErr PVDECL PvLinkCallbackRegister(tPvLinkCallback Callback,
           ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:593:14: error: expected ';' after top level declarator
    tPvErr PVDECL PvLinkCallbackRegister(tPvLinkCallback Callback,
                 ^
                 ;
    /opt/local/include/PvApi.h:616:8: error: redefinition of 'PVDECL' as different kind of symbol
    tPvErr PVDECL PvLinkCallbackUnRegister(tPvLinkCallback Callback,
           ^
    /opt/local/include/PvApi.h:271:15: note: previous definition is here
    typedef void (PVDECL *tPvLinkCallback)(void* Context,
                  ^
    /opt/local/include/PvApi.h:616:14: error: expected ';' after top level declarator
    tPvErr PVDECL PvLinkCallbackUnRegister(tPvLinkCallback Callback,
                 ^
                 ;
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [main.o] Error 1
    22:12:10: The process "/usr/bin/make" exited with code 2.
    Error while building/deploying project ListCameras (kit: Desktop Qt 5.0.2 clang 64bit)
    When executing step 'Make'
    Last edited by phdstudent; 03-25-2014 at 10:34 PM.

  8. #8
    PvApi prosilica camera for mac os X
    pigoo3's Avatar
    Member Since
    May 20, 2008
    Location
    U.S.
    Posts
    31,462
    Specs:
    2011 13" MBP 2.3ghz, 8gig ram, OS 10.7.5
    If OP really is a "phdstudent"...maybe we shouldn't be helping too much with the homework!

    - Nick
    - Too many "beachballs", read this: Beachballs
    - Computer seems slower than it used to? Read this for some slow computer tips: Speedup
    - Almost full hard drive? Some solutions. Out of Space
    - Apple Battery Info. Battery

  9. #9
    PvApi prosilica camera for mac os X
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,184
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    First, how much do you know about programming? You should make sure you are trying to take a bite out of something you can actually grasp..

    All of the errors after the first one are expected because you have an #error pre-processor statement telling you the problem, if you read it, it says that you have to define PVDECL to something real and then only with the #error not be hit and the code will begin to compile.

    Read the instructions that came along with the SDK to understand what you have to do to set it up properly..
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Camera question: Why is the camera a mirror effect?
    By iRyanMac in forum Apple Notebooks
    Replies: 13
    Last Post: 02-26-2015, 09:39 PM
  2. PvApi prosilica camera for mac os X
    By phdstudent in forum OS X - Operating System
    Replies: 0
    Last Post: 03-25-2014, 08:47 PM
  3. Difference between new iPad camera and iPhone 4S camera?
    By TheCyclist in forum iPad Hardware and Accessories
    Replies: 2
    Last Post: 03-10-2012, 09:15 AM
  4. Question about using digital camera as live camera feed
    By harpchic in forum Movies and Video
    Replies: 0
    Last Post: 08-04-2011, 11:11 PM
  5. FaceTime, Camera and PhotoBooth Icons Confirm Camera in iPad 2
    By the8thark in forum Apple Rumors and Reports
    Replies: 0
    Last Post: 01-20-2011, 08:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •