Closed justinmichaud closed 7 years ago
Did you install wine-headers package?
I installed wine-dev, all of the QT packages and Opengl, which seemed to help. Now the linker can't find any of the other projects in apps/, and I have no clue how to install them. I really have no clue how to use QT.
Is there any documentation anywhere for how to build this? If I can get this to compile, I would really like to automate and document this build process.
Thanks!
Please share your build errors. I have not been able to document the build process in Linux because it seems there are so many variants that something always goes wrong. I would appreciate any help in documenting how to build once you get there! Thanks.
Right now, I have opened the ide project in QT creator, and ld was complaining about not being able to find opengl32 (I replaced it with GL, but I have no clue if that will still work), as well as the rest of the projects in the apps directory. How can I set the ide project to build the projects it depends on? Thanks!
In the projects pane you can set dependencies. The projects pane is in the sidebar on the left. Once there, each project has a tab. Select the nesicide project tab and Dependencies is a tab of that pane. You'll see a checklist of all possible dependencies. Select nes-emulator-lib, c64-emulator-lib, famitracker-lib, qscintilla. famitracker-lib needs rtmidi as a dependency.
nesicide/libs/famitracker/Source/SoundGen.h:28: error: common.h: No such file or directory
So far, I've opened up all of the projects in apps, and all of the projects in libs, and set the ide project to depend on them. How do you have your ide set up? I feel like I must be missing something in the way I'm setting up the project.
Sorry, I'm new to QT.
That looks like it's a case-sensitivity issue. I'd thought all of those were hammered out. Common.h is in nesicide/libs/famitracker/Source. Feel free to send a pull request with any case sensitivity changes you run into like that. I've fixed the two cases of [cC]ommon.h that I found [if you pull master...] Honestly I'm not sure how that slipped but I am a single dev mainly in OSX now. I left Windows and [largely] Linux behind a couple years back. I got far too frustrated with all of the different variants and needs of Linux-based builds. I had someone helping with arch linux builds. Someone else helping with Debian. Someone else helping with gentoo. They come and go. :)
I pulled your changes, and adjusted the dependencies on the project. I really don't know if I can get this to compile. I get the error: :-1: error: [debug/in_ftm.o] Error 2
, whatever that means. That is the only output.
You don't need to build the Winamp plugin. :) You can remove that as a dependency from nesicide. You only need the dependencies I outlined here: https://github.com/christopherpow/nesicide/issues/20#issuecomment-252947695
Also vis_ftm isn't needed.
Thanks for the help
I installed librtmidi-dev and libqscintilla2-dev. I added famitracker-lib, c64-emulator-lib, and nes-emulator-lib as dependencies to the ide project. Then, I added famitracker-lib and in_ftm as a dependency to famitracker, which fixed some errors. I also fixed the case of #include "../Blip_Buffer/Blip_Buffer.h" in libs/famitracker/Source/APU/Mixer.h b/libs/famitracker/Source/APU/Mixer.h. Now, I am left with the following errors:
In file included from Source/stdafx.h:27:0,
from Source/PatternEditor.cpp:23:
Source/PatternEditor.cpp: In member function 'void CPatternEditor::OnMouseDownPattern(const CPoint&)':
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:2449:27: note: in expansion of macro 'max'
PointPos.m_iRow = std::max(PointPos.m_iRow, 0);
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:2450:27: note: in expansion of macro 'min'
PointPos.m_iRow = std::min(PointPos.m_iRow, m_iPatternLength - 1);
^
Source/PatternEditor.cpp: In member function 'void CPatternEditor::ContinueMouseSelection(const CPoint&)':
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:2586:25: note: in expansion of macro 'max'
PointPos.m_iRow = std::max(PointPos.m_iRow, 0);
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:2587:25: note: in expansion of macro 'min'
PointPos.m_iRow = std::min(PointPos.m_iRow, m_iPatternLength - 1);
^
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:2588:29: note: in expansion of macro 'max'
PointPos.m_iChannel = std::max(PointPos.m_iChannel, 0);
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:2589:29: note: in expansion of macro 'min'
PointPos.m_iChannel = std::min(PointPos.m_iChannel, ChannelCount - 1);
^
Source/PatternEditor.cpp: At global scope:
Source/PatternEditor.cpp:2764:40: warning: unused parameter 'nFlags' [-Wunused-parameter]
bool CPatternEditor::OnMouseHover(UINT nFlags, const CPoint &point)
^
In file included from Source/stdafx.h:27:0,
from Source/PatternEditor.cpp:23:
Source/PatternEditor.cpp: In member function 'CPatternClipData* CPatternEditor::Copy() const':
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:2887:20: note: in expansion of macro 'max'
for (int i = std::max(m_selection.GetChanStart(), 0); i <= std::min(m_selection.GetChanEnd(), ChannelCount - 1); ++i) {
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:2887:66: note: in expansion of macro 'min'
for (int i = std::max(m_selection.GetChanStart(), 0); i <= std::min(m_selection.GetChanEnd(), ChannelCount - 1); ++i) {
^
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:2889:21: note: in expansion of macro 'max'
for (int j = std::max(m_selection.GetRowStart(), 0); j <= std::min(m_selection.GetRowEnd(), m_iPatternLength - 1); ++j) {
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:2889:66: note: in expansion of macro 'min'
for (int j = std::max(m_selection.GetRowStart(), 0); j <= std::min(m_selection.GetRowEnd(), m_iPatternLength - 1); ++j) {
^
Source/PatternEditor.cpp: In member function 'void CPatternEditor::GetVolumeColumn(CString&) const':
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:3437:20: note: in expansion of macro 'max'
for (int i = std::max(m_selection.GetRowStart(), 0); i <= std::min(m_selection.GetRowEnd(), m_iPatternLength); ++i) {
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:3437:65: note: in expansion of macro 'min'
for (int i = std::max(m_selection.GetRowStart(), 0); i <= std::min(m_selection.GetRowEnd(), m_iPatternLength); ++i) {
^
Source/PatternEditor.cpp: In member function 'bool CPatternEditor::PerformDrop(const CPatternClipData*, bool, bool)':
../../common/cqtmfc.h:2306:18: error: expected unqualified-id before '(' token
#define max(a,b) (((a) > (b)) ? (a) : (b))
^
Source/PatternEditor.cpp:3516:37: note: in expansion of macro 'max'
m_selDrag.m_cpStart.m_iRow = std::max(m_selDrag.m_cpStart.m_iRow, 0);
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
^
Source/PatternEditor.cpp:3527:34: note: in expansion of macro 'min'
m_selDrag.m_cpEnd.m_iRow = std::min(m_selDrag.m_cpEnd.m_iRow, m_iPatternLength - 1);
^
../../common/cqtmfc.h:2307:18: error: expected unqualified-id before '(' token
#define min(a,b) (((a) > (b)) ? (b) : (a))
Ok. You don't need in_ftm. That is a Winamp plugin for Windows to play FT modules in Winamp directly. Try a pull now. I found and changed the instances of usage of max/min and replaced them with std::max/std::min and removed my hacros.
sudo apt-get install qtcreator libwine-development build-essential mesa-common-dev libglu1-mesa-dev qtdeclarative5-dev libqt5webkit5-dev libqscintilla2-dev libwine-development-dev wine-development wine-dev libboost-dev
Then, I installed rtmidi from http://packages.ubuntu.com/xenial/librtmidi-dev:
sudo apt-get install libjack-dev librtaudio-dev librtmidi2v5
sudo dpkg -i './librtmidi-dev_2.1.0-ds0-4_amd64.deb'
Then, I opened the ide project in qt creator, opened the c64-emulator-lib famitracker-lib and nes-emulator-lib projects, and added them in the dependencies tab of the ide project.
I made the following changes to fix cases, and an error that QThread::sleep was protected, which I've attached as a patch.
Now, I get the following error from the famitracker lib:
In file included from ../famitracker/Source/CustomExporter_C_Interface.cpp:1:0:
../famitracker/Source/CustomExporterInterfaces.h:89:16: error: expected ')' before '*' token
void (__cdecl *GetNoteData)(unsigned int Frame, unsigned int Channel, unsigned int Row, stChanNote *Data);
^
../famitracker/Source/CustomExporterInterfaces.h:90:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetFrameCount)();
^
../famitracker/Source/CustomExporterInterfaces.h:91:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetPatternLength)();
^
../famitracker/Source/CustomExporterInterfaces.h:92:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetSongSpeed)();
^
../famitracker/Source/CustomExporterInterfaces.h:95:15: error: expected ')' before '*' token
int (__cdecl *GetSequenceCount)(int Type);
^
../famitracker/Source/CustomExporterInterfaces.h:96:26: error: expected ')' before '*' token
SequenceHandle (__cdecl *GetSequence)(int Index, int Type);
^
../famitracker/Source/CustomExporterInterfaces.h:98:23: error: expected ')' before '*' token
signed char (__cdecl *GetItem)(SequenceHandle sequence, int Index);
^
../famitracker/Source/CustomExporterInterfaces.h:99:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetItemCount)(SequenceHandle sequence);
^
../famitracker/Source/CustomExporterInterfaces.h:100:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetLoopPoint)(SequenceHandle sequence);
^
../famitracker/Source/CustomExporterInterfaces.h:103:15: error: expected ')' before '*' token
int (__cdecl *GetInstrumentCount)();
^
../famitracker/Source/CustomExporterInterfaces.h:104:35: error: expected ')' before '*' token
Instrument2A03Handle (__cdecl *Get2A03Instrument)(int Instrument);
^
../famitracker/Source/CustomExporterInterfaces.h:106:18: error: expected ')' before '*' token
int (__cdecl *GetSeqEnable)(Instrument2A03Handle instrument, int Index);
^
../famitracker/Source/CustomExporterInterfaces.h:107:15: error: expected ')' before '*' token
int (__cdecl *GetSeqIndex)(Instrument2A03Handle instrument, int Index);
^
../famitracker/Source/CustomExporterInterfaces.h:110:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetNoteEffectType)(unsigned int Frame, unsigned int Channel, unsigned int Row, int Index);
^
../famitracker/Source/CustomExporterInterfaces.h:111:24: error: expected ')' before '*' token
unsigned int (__cdecl *GetNoteEffectParam)(unsigned int Frame, unsigned int Channel, unsigned int Row, int Index);
^
../famitracker/Source/CustomExporterInterfaces.h:114:15: error: expected ')' before '*' token
int (__cdecl *GetSampleCount)();
^
../famitracker/Source/CustomExporterInterfaces.h:115:16: error: expected ')' before '*' token
void (__cdecl *GetSampleName)(unsigned int Index, char *Name);
^
../famitracker/Source/CustomExporterInterfaces.h:116:15: error: expected ')' before '*' token
int (__cdecl *GetSampleSize)(unsigned int Sample);
^
../famitracker/Source/CustomExporterInterfaces.h:117:16: error: expected ')' before '*' token
char (__cdecl *GetSampleData)(unsigned int Sample, unsigned int Offset);
^
../famitracker/Source/CustomExporterInterfaces.h:120:16: error: expected ')' before '*' token
char (__cdecl *GetSample)(Instrument2A03Handle instrument, int Octave, int Note);
^
../famitracker/Source/CustomExporterInterfaces.h:121:16: error: expected ')' before '*' token
char (__cdecl *GetSamplePitch)(Instrument2A03Handle instrument, int Octave, int Note);
^
../famitracker/Source/CustomExporterInterfaces.h:122:16: error: expected ')' before '*' token
char (__cdecl *GetSampleLoopOffset)(Instrument2A03Handle instrument, int Octave, int Note);
^
../famitracker/Source/CustomExporter_C_Interface.cpp: In function 'void GetInterface(FamitrackerDocInterface*)':
../famitracker/Source/CustomExporter_C_Interface.cpp:16:9: error: 'struct FamitrackerDocInterface' has no member named 'GetNoteData'
iface->GetNoteData = GetNoteData;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:17:9: error: 'struct FamitrackerDocInterface' has no member named 'GetFrameCount'
iface->GetFrameCount = GetFrameCount;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:18:9: error: 'struct FamitrackerDocInterface' has no member named 'GetPatternLength'
iface->GetPatternLength = GetPatternLength;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:19:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSongSpeed'
iface->GetSongSpeed = GetSongSpeed;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:22:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSequenceCount'
iface->GetSequenceCount = GetSequenceCount;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:23:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSequence'
iface->GetSequence = GetSequence;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:25:9: error: 'struct FamitrackerDocInterface' has no member named 'GetItem'
iface->GetItem = GetItem;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:26:9: error: 'struct FamitrackerDocInterface' has no member named 'GetItemCount'
iface->GetItemCount = GetItemCount;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:27:9: error: 'struct FamitrackerDocInterface' has no member named 'GetLoopPoint'
iface->GetLoopPoint = GetLoopPoint;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:30:9: error: 'struct FamitrackerDocInterface' has no member named 'GetInstrumentCount'
iface->GetInstrumentCount = GetInstrumentCount;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:31:12: error: 'struct FamitrackerDocInterface' has no member named 'Get2A03Instrument'
iface->Get2A03Instrument = Get2A03Instrument;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:33:12: error: 'struct FamitrackerDocInterface' has no member named 'GetSeqEnable'
iface->GetSeqEnable = GetSeqEnable;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:34:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSeqIndex'
iface->GetSeqIndex = GetSeqIndex;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:37:9: error: 'struct FamitrackerDocInterface' has no member named 'GetNoteEffectType'
iface->GetNoteEffectType = GetNoteEffectType;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:38:9: error: 'struct FamitrackerDocInterface' has no member named 'GetNoteEffectParam'
iface->GetNoteEffectParam = GetNoteEffectParam;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:41:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSampleCount'
iface->GetSampleCount = GetSampleCount;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:42:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSampleName'
iface->GetSampleName = GetSampleName;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:43:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSampleSize'
iface->GetSampleSize = GetSampleSize;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:44:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSampleData'
iface->GetSampleData = GetSampleData;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:47:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSample'
iface->GetSample = GetSample;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:48:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSamplePitch'
iface->GetSamplePitch = GetSamplePitch;
^
../famitracker/Source/CustomExporter_C_Interface.cpp:49:9: error: 'struct FamitrackerDocInterface' has no member named 'GetSampleLoopOffset'
iface->GetSampleLoopOffset = GetSampleLoopOffset;
^
I have no clue what would be causing this error. Thanks!
What version of Qt are you using? I installed Qt 5.7.0 kit in Linux Mint and I am getting strange "Qt requires c++11 support" errors from Qt Core. Tried several remedies found on SO to no avail.
5.5.1
Is there any news on this? I was wondering what ideas you had for the error that I am getting above. I'm using QT 5.5.1 on Ubuntu 16.04. It seems like a very strange error.
Thanks!
I haven't had a chance to look into it yet. Got busy with work. :|
I'm having trouble with the rtmidi. Could you elaborate on how you got it? I am running Linux Mint (Ubuntu 14.04) in a VM.
For some stupid reason, the rtmidi packages are broken. I downloaded the latest amd64 deb from http://packages.ubuntu.com/xenial/librtmidi-dev, and ran the following commands to install dependencies and the deb file. You may need to run sudo apt-get install -f
both before and after running these commands, especially if you get an error about holding broken packages
sudo apt-get install libjack-dev librtaudio-dev librtmidi2v5
sudo dpkg -i './librtmidi-dev_2.1.0-ds0-4_amd64.deb'
I really have no idea why the rtmidi package doesn't work. Thanks for the help!
Please pull and try. I have fixed the errors you reported but am still having trouble with rtmidi.
Justin do you still have this problem?
Sorry for the late reply. I gave up trying a while ago :(
Best of luck, and thanks for helping out!
Thanks for trying. I've put a bit of effort into trying to make it easier to build lately. If you've got a sec and are willing to just give it a good ten minute try, I would appreciate some idea of what isn't working in Linux. I updated the README.md with build instructions.
Hi, I am trying to build on Ubuntu 16.04. What I've tried:
dpkg-buildpackage -us -uc
fails with:I installed QT Creator and all of the build-depends listed in the debian package, but when I try to build the ide project, I get the following error:
I wasn't able to find any instructions or binaries anywhere, so I really have no clue what I should be doing to build this. Any help would be greatly appreciated!