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.

Empfohlene Antworten

Veröffentlicht

Hi,

ich hab in einer DLL eine neue Funktion eingefügt und bekomme folgende Warnung:

C:\c++\Stdfunc\stdfuncdll\stdfunc.cpp(41) : warning C4273: 'ReadCard' : Inkonsistente DLL-Bindung. dllexport angenommen.

stdfunc.obj - 0 Fehler, 1 Warnung(en)

Die Headerdatei sieht so aus:


#include "stdafx.h"

#ifdef __cplusplus
extern "C" {
#endif
#ifdef MKL_EXPORTS
#define MKL_API __declspec(dllexport)
#else
#define MKL_API __declspec(dllimport)
#endif

MKL_API int ReadCard(int,int,int,char*,char*,char*,long,int);

#ifdef __cplusplus
}
#endif
[/PHP]

und die Funktionsdefinition bisher so:

[PHP]
int ReadCard(int iKartenfunktion,
int iSchnittstelle,
int iTyp,
char* szKontonummer,
char* szBankleitzahl,
char* szTransaktionsnummer,
long iBetrag,
int iQuittung)
{
return 0;
}

Weiß einer was die Warnung genau Bedeutet und was ich dagegen machen kann?

Gruß

Guybrush

Du hast ja zwei Fälle einmal gibt es Dein Define dann haeißt das export und ein anderes mal nicht.

Deine Warnung kommt immer dann wenn du die Funktion mit __declspec(dllimport) importieren willst der compiler aber trotzdem einen implementierung dieser Funkton findet. Beim Import brauchst ja keine Implementierung.

Das heißt, wenn du das File zum Importieren der Funktion benutzt darfst du das cpp-File nicht mit kompilieren.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.