Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Heyhey, ich hab da eine Frage zum kompilieren des Codes mit den C/C++ Bindings - besser gesagt, ich bekomme es nicht zum laufen... Ich verwende den QtCreator, da ich finde das es damit "leichter" bzw. angenehmer ist, GUI´s zu basteln. Außerdem sollte ich noch sagen, das ich kein Crack in Sachen C/C++ bin - aber ich lerne jeden Tag neu dazu und die grundlegendsten Dinge beherrsche ich. Auf jeden Fall bekomme ich als Fehler eine "undefined reference", wenn ich "ipcon_create()" mit entsprechenden Parametern aufrufe. Der genau Fehler:

 

"./debug\brick.o:C:\Users\Fab\Desktop\stuff\Qt\XboxController\compiled/../XboxController/brick.cpp:17: undefined reference to `ipcon_create(IPConnection_*, char const*, int)'

 

collect2: ld returned 1 exit status

 

mingw32-make[1]: Leaving directory `C:/Users/Fab/Desktop/stuff/Qt/XboxController/compiled'

 

mingw32-make: Leaving directory `C:/Users/Fab/Desktop/stuff/Qt/XboxController/compiled'

 

mingw32-make[1]: * [debug\XboxController.exe] Error 1

 

mingw32-make: * [debug] Error 2

 

Der Prozess "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" wurde mit dem Rückgabewert %2 beendet. Fehler beim Erstellen des Projekts XboxController(Ziel: Desktop) Bei der Ausführung von Build-Schritt 'Make'"

 

Den Header habe ich eig. richtig eingebunden, da ich das IPConnection-Objekt erstellen kann ohne Compiler Fehler. ( "IPConnection ipcon;" ) In der Doku unter API Bindings wird erwähnt: "On Windows Winsock2 is used for threading. Under MinGW we can compile the example as following (hint: the library linking must come after the source):

 

gcc -o example_configuration.exe brick_stepper.c ip_connection.c example_configuration.c -lws2_32 "

 

Muss ich das jetzt schon beachten oder erst wenn ich mit den Callbacks arbeite? ( Habe es auch schon im make-Aufruf miteingefügt, aber auch ohne Erfolg.

 

Hier die .cpp Datei: http://pastebin.com/ErypscCp

 

Das .pro file http://pastebin.com/rp8PKUvB

 

und hier einmal der qmake aufruf ( wobei dieser ja nichts groß damit zu tun haben kann ) "qmake.exe C:/Users/Fab/Desktop/stuff/Qt/XboxController/XboxController/XboxController.pro -r -spec win32-g++"

 

und der normale make aufruf: "mingw32-make.exe -w in C:\Users\Fab\Desktop\stuff\Qt\XboxController\compiled"

 

Ich hoffe ich habe nichts kleines übersehen oder was falsch eingestellt, aber ich komme einfach nicht auf den Fehler...

 

Ich bitte um schnelle Antwort...

 

Vielen Dank!

 

Faab

 

EDIT: Wenn ich die ip_connection.c und ip_connection.h mit einbinde, ( was ich noch übersehen hatte ) bringt er mir diese Fehler: http://imageshack.us/photo/my-images/14/errorof.jpg/

 

EDIT2: Ok - habe jetzt herausgefunden, das es daran liegt das ich die Lib nicht richtig miteinbinde... Ich habe das .pro file jetzt um folgende zeile erweitert:

 

"win32:LIBS += -L"C:\Qt\2010.05\mingw\lib" -lws2_32"

 

die lib wird auch anscheinend gefunden. Das make-Comando habe ich ebenfalls angepasst:

 

"mingw32-make.exe -lws2_32 -w in C:\Users\Fab\Desktop\stuff\Qt\XboxController\compiled"

 

jetzt bringt er mir aber trotzdem noch den gleichen Fehler:

 

"./debug\brick.o:C:\Users\Fab\Desktop\stuff\Qt\XboxController\compiled/../XboxController/brick.cpp:17: undefined reference to `ipcon_create(IPConnection_*, char const*, int)'

 

collect2: ld returned 1 exit status"

 

Weis jemand was jetzt noch fehlt bzw. was ich falsch angepasst habe?

Geschrieben
  • Autor

Okay - habe es jetzt hinbekommen, habe einen kleinen simplen Fehler gemacht und die bindings nicht richtig miteingebunden... -> Closed ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.