Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

Makefile Bibliothek einbinden

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe gerade angefangen, Makefiles zu benutzen und habe dazu eine Frage:

Ich möchte eine Bibliothek benutzen, die ich mir heruntergeladen habe. In der Readme-Datei stand, man müsse nur:

"To use just include the lib and header file thats all you need."

Zitat:

(videoInput Library)

Also zwei Dateien. Darum habe ich meinen Makefile folgendermaßen geschrieben (Ich kompilliere mit MingW):

Code:

CXXFLAGS = -O2 -g -Wall -fmessage-length=0


OBJS = TEST.o

HEADER = videoInput.h

LIBS = -L'C:\videoInput0.1991\compiledLib\compiledByCW' -lvideoInput

TARGET = TEST.exe


$(TARGET): $(OBJS)

$(CXX) -o $(TARGET) $(OBJS) $(HEADER) $(LIBS)


all: $(TARGET)


clean:

rm -f $(OBJS) $(TARGET)

Wenn ich aber dann make ausführe, kommen etliche Fehlermeldungen, die so aussehen:

C:\...workspace/TEST/TEST.cpp:15: undefined reference to `videoInput::videoInput()'

Also hat ja wohl was beim Linken nicht geklappt, oder?

Habe ich beim Makefile einen syntaktischen Fehler gemacht?

Gruß,

informat

Bearbeitet von Klotzkopp
Doppelter Code gelöscht

Ich habe den doppelten Makefile-Code gelöscht, aber trotzdem scheint da die Regel für Test.o zu fehlen.

Wenn ich aber dann make ausführe, kommen etliche Fehlermeldungen, die so aussehen:

C:\...workspace/TEST/TEST.cpp:15: undefined reference to `videoInput::videoInput()'

Stehen vor den Linkerfehlern vielleicht noch welche, die anders aussehen?

C:\videoInput0.1991\compiledLib\compiledByCW
Ich glaube kaum, dass dein MinGW mit einer CodeWarrior-Bibliothek zurechtkommt. Versuch mal die DevCpp-Library, da steckt üblicherweise derselbe Compiler dahinter.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.