Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error on compile #1

Open
DemonSinusa opened this issue Jul 12, 2018 · 5 comments
Open

Linker error on compile #1

DemonSinusa opened this issue Jul 12, 2018 · 5 comments

Comments

@DemonSinusa
Copy link

[100%] Building CXX object src/vidalia/CMakeFiles/vidalia.dir/vidalia_autogen/GXDUDAM45N/qrc_vidalia_i18n.cpp.o
[100%] Linking CXX executable vidalia
CMakeFiles/vidalia.dir/Vidalia.cpp.o: In function VidaliaNativeEventFilter::VidaliaNativeEventFilter()': Vidalia.cpp:(.text._ZN24VidaliaNativeEventFilterC2Ev[_ZN24VidaliaNativeEventFilterC5Ev]+0x1b): undefined reference to vtable for VidaliaNativeEventFilter'

cmake parm:
$ cmake .. -DUSE_QT5=ON -DUSE_GEOIP=1

@DemonSinusa
Copy link
Author

so and crossplatform replace
src/vidalia/MainWindow.cpp str 846-850 to
"QThread::sleep(1);"

@kayfab3
Copy link

kayfab3 commented Oct 6, 2021

@DemonSinusa this answer is coming three years late. Maybe it helps.

@a-ilin you might want to update two files.

After fixing these two bugs the code compiles on linux. The linker compile bug effected compiling on linux and other derivatives. Windows compiling was not effected as the MS windows check was a different function in Vidalia.cpp

It might have been better to port Vidalia 0.2.21

Vidalia 0.3.3 definitely feels alpha and some functionality is broken. Circuits do not display or refresh quickly. It is not possible to delete or close a tor circuit because the QT widgets controlling this functionality are slow to refresh and are essentially broken. They do not respond well to user input.

A QT dev with experience should be able to optimize the code and correct issues with this QT4 to QT5 port.

#
# BUG FIX #1 - mainwindow.cpp
#
https://github.com/a-ilin/vidalia/blob/alpha-qt5/src/vidalia/MainWindow.cpp

REPLACE lines 846-850

      #if defined(Q_OS_WIN)
            Sleep(1000);
      #else
            sleep(1);
      #endif

replace with

QThread::sleep(1);


#
# BUG FIX #2 - Vidalia.cpp
#
https://github.com/a-ilin/vidalia/blob/alpha-qt5/src/vidalia/Vidalia.cpp

This resolves the linker error on compile

INSERT on line 242

#else
bool VidaliaNativeEventFilter::nativeEventFilter(const QByteArray& /*eventType*/, void* message, long* result)
{
    return false;
}

After insert the section of code appears as


#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
  return QApplication::winEventFilter(msg, result);
#else
  return false;
#endif
}
#else
bool VidaliaNativeEventFilter::nativeEventFilter(const QByteArray& /*eventType*/, void* message, long* result)
{
    return false;
}
#endif

@DemonSinusa
Copy link
Author

@kayfab3 Thanks for the answer, but now so much has changed in the libraries ... Some of the macros and classes QT5 and CMake is deprecated.
If there is a working solution, then I will be grateful and happy to use it, as well as, with permission, I will make a PKGBUILD for the AUR.

@kayfab3
Copy link

kayfab3 commented Feb 18, 2022

@DemonSinusa

I was able to compile the repo code using the steps outlined above. I can't speak to changes or deprecated macros and classes in QT5. I know this isn't the answer you were hoping for. If someone else is going to port tor further it's not going to be me.

@barracuda156
Copy link

@kayfab3 Perhaps related: #2

barracuda156 added a commit to barracuda156/vidalia that referenced this issue Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants